bitkeeper revision 1.1389.15.21 (4282aa75a-T-dS1Y6SxMFP1eBJkE5w)
authormwilli2@equilibrium.research <mwilli2@equilibrium.research>
Thu, 12 May 2005 00:59:33 +0000 (00:59 +0000)
committermwilli2@equilibrium.research <mwilli2@equilibrium.research>
Thu, 12 May 2005 00:59:33 +0000 (00:59 +0000)
Fix the fake e820 map for dom0 and unpriv domains, request certain
resources only when in dom0.

This makes /proc/iomem look "more" normal and makes kernel IO memory
resource tree more accurate.

Signed-off-by: mark.williamson@cl.cam.ac.uk
linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c
linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h

index a53fdd31d42da70093c0a96c345f4c7e231bcc4d..7f13e192531b5e1062e1860628937677d57d4c5e 100644 (file)
@@ -289,6 +289,10 @@ static void __init probe_roms(void)
        unsigned char *rom;
        int           i;
 
+        /* Nothing to do if not running in dom0. */
+       if ( !(xen_start_info.flags & SIF_INITDOMAIN) )
+                return;
+
        /* video rom */
        upper = adapter_rom_resources[0].start;
        for (start = video_rom_resource.start; start < upper; start += 2048) {
@@ -1213,8 +1217,9 @@ static void __init register_memory(void)
        else
                legacy_init_iomem_resources(&code_resource, &data_resource);
 
-       /* EFI systems may still have VGA */
-       request_resource(&iomem_resource, &video_ram_resource);
+       if ( xen_start_info.flags & SIF_INITDOMAIN )
+                /* EFI systems may still have VGA */
+                request_resource(&iomem_resource, &video_ram_resource);
 
        /* request I/O space for devices used on all i[345]86 PCs */
        for (i = 0; i < STANDARD_IO_RESOURCES; i++)
index 2bfd4df069a0ebf8c83528670de161249f3b509d..ac8cbb7a920bedc8065885ab5871211fbad21543 100644 (file)
@@ -13,7 +13,12 @@ static char * __init machine_specific_memory_setup(void)
 
        who = "Xen";
 
-       start_pfn = 0;
+        /* In dom0, we have to start the fake e820 map above the first 1MB, in
+         * other domains, it can start at 0. */
+       if ( xen_start_info.flags & SIF_INITDOMAIN )
+                start_pfn = 0x100;
+        else
+                start_pfn = 0;
        max_pfn = xen_start_info.nr_pages;
 
        e820.nr_map = 0;